package com.study.studyInstance;

public class TestPolymorphic {
    public static void main(String[] args) {
        Biology b = new Biology();
        b.eat(new People());
        b.eat(new Animal());
        b.eat(new Plant());
    }
}
class Biology{
    public void eat(Biology b){
        System.out.println("需要获取营养");
    }
}
class People extends Biology{}
class Plant extends Biology{}
class Animal extends Biology{}